
import { createRouter, createWebHistory } from 'vue-router'
import addOrUpd from "../views/addOrUpd.vue"
import app from "../App.vue";
import Home from "../views/Home.vue"

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: "Home",  // 修改为不同的名称
      component: Home, 
    },
    {
    path: '/upd/:id',
    name: 'update',  // 修改为不同的名称
    component: addOrUpd, 
  },
 
 
    {
      path: '/add',
      name: 'addOrUpd',
      component: addOrUpd,
    },
  ],
})

export default router
